import { RouteConfig } from "vue-router";
import Index from '@/pages/mall/index.vue';
import CouponSelect from '@/pages/mall/couponSelect.vue';
import Comment from '@/pages/mall/comment.vue';
import FreeProduct from '@/pages/mall/freeProduct.vue';
import SpecDetail from '@/pages/mall/specDetail.vue';

import ProductDetail from '@/pages/mall/productDetail.vue';

import { ROUTE_NAME } from "@/lib/constant";

export const routes: RouteConfig[] = [
    {
        path: '/mall/index',
        name: ROUTE_NAME.MALL_INDEX,
        meta: {
            title: '商城',
        },
        component: Index,
    },
    {
        path: '/mall/coupon_select',
        name: ROUTE_NAME.MALL_COUPON_SELECT,
        meta: {
            title: '代金券',
        },
        component: CouponSelect,
    },
    {
        path: '/mall/comment/:orderId',
        name: ROUTE_NAME.MALL_COMMENT,
        meta: {
            title: '评价晒单',
        },
        component: Comment,
    },
    {
        path: '/mall/free_product',
        name: ROUTE_NAME.MALL_FREE_PRODUCT,
        meta: {
            title: '赠送产品',
        },
        component: FreeProduct,
    },
    {
        path: '/mall/spec_detail',
        name: ROUTE_NAME.MALL_SPEC_DETAIL,
        meta: {
            title: '产品详情',
        },
        component: SpecDetail,
    },


    {
        path: '/mall/productDetail',
        name: ROUTE_NAME.MALL_PRODUCT_DETAIL,
        meta: {
            title: '产品详情',
        },
        component: ProductDetail,
    },

];
